import request from '@/utils/request'

export function createDept(data) {
  return request({
    url: '/admin/leaves/dept/createDept',
    method: 'post',
    data
  })
}

export function deleteDept(id) {
  return request({
    url: `/admin/leaves/dept/deleteDept/${id}`,
    method: 'delete'
  })
}

export function updateDept(deptInfo) {
  return request({
    url: '/admin/leaves/dept/updateDept',
    method: 'put',
    data: deptInfo
  })
}

export function getDept(id) {
  return request({
    url: `/admin/leaves/dept/get/${id}`,
    method: 'get'
  })
}

export function getDeptList() {
  return request({
    url: '/admin/leaves/dept/getList',
    method: 'get'
  })
}
